interface columnData {
  title: string
  dataIndex: string
  className?: string
  customRender?: (text: any, record: any, index: number) => any
  fixed?: string
  width?: number
}

export const columns: Array<columnData> = [
  {
    title: '呼叫id',
    dataIndex: 'callId',
    width: 100
  },
  {
    title: '主叫号码',
    dataIndex: 'callerNumber',
    width: 120
  },
  {
    title: '主叫显号',
    dataIndex: 'callerDisplayNumber',
    width: 120
  },
  {
    title: '被叫号码',
    dataIndex: 'calleeNumber',
    width: 120
  },
  {
    title: '被叫显号',
    dataIndex: 'calleeDisplayNumber',
    width: 120
  },
  {
    title: '号码归属地',
    dataIndex: 'numberLocation',
    width: 120
  },
  {
    title: '坐席号码',
    dataIndex: 'agentNumber',
    width: 120
  },
  {
    title: '坐席名称',
    dataIndex: 'agentName',
    width: 100
  },
  {
    title: '呼叫状态',
    dataIndex: 'callState',
    customRender: ({ text }) => {
      return text === 1 ? '成功' : '失败'
    },
    width: 100
  },
  {
    title: '呼叫方式',
    dataIndex: 'direction',
    customRender: ({ text }) => {
      return text === 1 ? '呼入' : '呼出'
    },
    width: 100
  },
  {
    title: '呼叫开始时间',
    dataIndex: 'callStartTime',
    width: 180
  },
  {
    title: '振铃时间',
    dataIndex: 'ringingTime',
    width: 180
  },
  {
    title: '接通时间',
    dataIndex: 'answerTime',
    width: 180
  },
  {
    title: '呼叫结束时间',
    dataIndex: 'callEndTime',
    width: 180
  },
  {
    title: '挂机方式',
    dataIndex: 'hangupDir',
    customRender: ({ text }) => {
      return text === 1 ? '主叫挂机' : text === 2 ? '被叫挂机' : '系统挂机'
    },
    width: 100
  },
  {
    title: '挂机原因',
    dataIndex: 'hangupCauseCode',
    width: 180
  },
  {
    title: '录音文件',
    dataIndex: 'filePath',
    width: 100
  },
  {
    title: '振铃文件',
    dataIndex: 'ringingPath',
    width: 100
  },
  {
    title: '创建人',
    dataIndex: 'createBy',
    width: 120
  },
  {
    title: '创建时间',
    dataIndex: 'createTime',
    width: 180
  },
  {
    title: '更新人',
    dataIndex: 'updateBy',
    width: 120
  },
  {
    title: '更新时间',
    dataIndex: 'updateTime',
    width: 180
  },
  {
    title: '操作',
    dataIndex: 'operate',
    width: 120,
    fixed: 'right'
  }
]
